<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="generator" content="ApiGen 2.7.0" />

	<title>Class Authenticate | nort</title>

	<script type="text/javascript" src="resources/combined.js?1481722677"></script>
	<script type="text/javascript" src="elementlist.js?1094816827"></script>
	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?1567499433" />

</head>

<body>
<div id="left">
	<div id="menu">
		<a href="index.html" title="Overview"><span>Overview</span></a>


		<div id="groups">
			<h3>Packages</h3>
			<ul>
				<li><a href="package-App.html">App<span></span></a>
						<ul>
				<li><a href="package-App.Saas.html">Saas</a>
						</li>
				<li><a href="package-App.saas.html">saas</a>
						</li>
				<li><a href="package-App.SaaS.html">SaaS<span></span></a>
						<ul>
				<li><a href="package-App.saas.Logic.html">Logic</a>
						</li>
				<li><a href="package-App.SaaS.SaaS.html">SaaS</a>
						</li>
				<li><a href="package-App.Saas.Tables.html">Tables</a>
						</li>
				<li><a href="package-App.Saas.Vo.html">Vo</a>
						</li>
							</ul></li></ul></li>
				<li><a href="package-aqua.html">aqua<span></span></a>
						<ul>
				<li><a href="package-aqua.tools.html">tools<span></span></a>
						<ul>
				<li><a href="package-aqua.tools.Monitor.html">Monitor</a>
						</li>
							</ul></li></ul></li>
				<li class="active"><a href="package-flashservices.html">flashservices<span></span></a>
						<ul>
				<li><a href="package-flashservices.adapters.html">adapters</a>
						</li>
				<li><a href="package-flashservices.debug.html">debug</a>
						</li>
				<li><a href="package-flashservices.exception.html">exception</a>
						</li>
				<li><a href="package-flashservices.filters.html">filters</a>
						</li>
				<li><a href="package-flashservices.io.html">io</a>
						</li>
				<li><a href="package-flashservices.sql.html">sql</a>
						</li>
				<li class="active"><a href="package-flashservices.util.html">util</a>
						</li>
							</ul></li>
				<li><a href="package-Mekayotl.html">Mekayotl<span></span></a>
						<ul>
				<li><a href="package-Mekayotl.core.html">core</a>
						</li>
				<li><a href="package-Mekayotl.database.html">database<span></span></a>
						<ul>
				<li><a href="package-Mekayotl.database.dal.html">dal</a>
						</li>
				<li><a href="package-Mekayotl.database.mysql.html">mysql</a>
						</li>
				<li><a href="package-Mekayotl.database.sqlite.html">sqlite</a>
						</li>
							</ul></li>
				<li><a href="package-Mekayotl.tools.html">tools<span></span></a>
						<ul>
				<li><a href="package-Mekayotl.tools.render.html">render<span></span></a>
						<ul>
				<li><a href="package-Mekayotl.tools.render.html.html">html</a>
						</li>
							</ul></li>
				<li><a href="package-Mekayotl.tools.renders.html">renders</a>
						</li>
							</ul></li></ul></li>
				<li><a href="package-None.html">None</a>
						</li>
				<li><a href="package-PHP.html">PHP</a>
						</li>
				<li><a href="package-PHPMailer.html">PHPMailer</a>
						</li>
				<li><a href="package-Services.html">Services<span></span></a>
						<ul>
				<li><a href="package-Services.JSON.html">JSON</a>
						</li>
							</ul></li>
				<li><a href="package-Swift.html">Swift<span></span></a>
						<ul>
				<li><a href="package-Swift.ByteStream.html">ByteStream</a>
						</li>
				<li><a href="package-Swift.CharacterStream.html">CharacterStream</a>
						</li>
				<li><a href="package-Swift.Encoder.html">Encoder</a>
						</li>
				<li><a href="package-Swift.Events.html">Events</a>
						</li>
				<li><a href="package-Swift.KeyCache.html">KeyCache</a>
						</li>
				<li><a href="package-Swift.Mailer.html">Mailer</a>
						</li>
				<li><a href="package-Swift.Mime.html">Mime</a>
						</li>
				<li><a href="package-Swift.Plugins.html">Plugins</a>
						</li>
				<li><a href="package-Swift.Transport.html">Transport</a>
						</li>
							</ul></li>
			</ul>
		</div>

		<hr />


		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="class-AMFObject.html">AMFObject</a></li>
				<li class="active"><a href="class-Authenticate.html">Authenticate</a></li>
				<li><a href="class-DateWrapper.html">DateWrapper</a></li>
				<li><a href="class-DescribeService.html">DescribeService</a></li>
				<li><a href="class-Headers.html">Headers</a></li>
				<li><a href="class-MessageBody.html">MessageBody</a></li>
				<li><a href="class-MessageHeader.html">MessageHeader</a></li>
				<li><a href="class-NetDebug.html">NetDebug</a></li>
			</ul>





		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
<div id="rightInner">
	<form id="search">
		<input type="hidden" name="cx" value="" />
		<input type="hidden" name="ie" value="UTF-8" />
		<input type="text" name="q" class="text" />
		<input type="submit" value="Search" />
	</form>

	<div id="navigation">
		<ul>
			<li>
				<a href="index.html" title="Overview"><span>Overview</span></a>
			</li>
			<li>
				<a href="package-flashservices.util.html" title="Summary of flashservices\util"><span>Package</span></a>
			</li>
			<li class="active">
<span>Class</span>			</li>
		</ul>
		<ul>
			<li>
				<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
			</li>
		</ul>
		<ul>
		</ul>
	</div>

<div id="content" class="class">
	<h1>Class Authenticate</h1>


	<div class="description">
	
<p>The Authenticate package is used to define helper methods related to
authentication.</p>

<p>Authentication will only work if sessions are enabled. Currently there is no
testing error reporting of this and probably won't be until the PHP5 version.
Complex error handling is just too cumbersome in php &lt; 5.</p>

	</div>









	<div class="info">
		
		
		
		<b>Package:</b> <a href="package-flashservices.html">flashservices</a>\<a href="package-flashservices.util.html">util</a><br />

				<b>Copyright:</b>
				(c) 2003 amfphp.org<br />
				<b>License:</b>
				<a href="http://opensource.org/licenses/gpl-license.php">GNU Public License</a><br />
				<b>Version:</b>
				$Id: Authenticate.php,v 1.11 2005/03/24 22:19:48 pmineault Exp $<br />
		<b>Located at</b> <a href="source-class-Authenticate.html#4" title="Go to source code">lib/php/externals/amfphp/core/shared/util/Authenticate.php</a><br />
	</div>


	<table class="summary" id="methods">
	<caption>Methods summary</caption>
	<tr data-order="isAuthenticated" id="_isAuthenticated">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_isAuthenticated">#</a>
		<code><a href="source-class-Authenticate.html#20" title="Go to source code">isAuthenticated</a>( )</code>

		<div class="description short">
			
<p>isAuthenticated hides the session implementation for tracking user
access.</p>

		</div>

		<div class="description detailed hidden">
			
<p>isAuthenticated hides the session implementation for tracking user
access.</p>




				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br>Whether the current user has been authenticated<br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="getAuthUser" id="_getAuthUser">

		<td class="attributes"><code>
			 public 
			string
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getAuthUser">#</a>
		<code><a href="source-class-Authenticate.html#34" title="Go to source code">getAuthUser</a>( )</code>

		<div class="description short">
			
<p>getAuthUser returns the current user name of the user that is logged in with
the session.</p>

		</div>

		<div class="description detailed hidden">
			
<p>getAuthUser returns the current user name of the user that is logged in with
the session.</p>




				<h4>Returns</h4>
				<div class="list">
					<code>string</code><br>the name of the authenticated user<br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="isUserInRole" id="_isUserInRole">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_isUserInRole">#</a>
		<code><a href="source-class-Authenticate.html#47" title="Go to source code">isUserInRole</a>( <span>string <var>$roles</var></span> )</code>

		<div class="description short">
			
<p>Returns TRUE if the client is authenticated and the requested roles passed
match.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Returns TRUE if the client is authenticated and the requested roles passed
match.</p>

<p>Every service method can have a comman delimited list of roles that are
required to access a service. Every user can also be assigned to a seperate
comma delimited list to roles they belong to. This method compares those two
strings (lists) and makes sure there is atleast one match.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$roles</var></dt>
					<dd><code>string</code><br> comma delimited list of the methods roles</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br>Whether the user is in the proper role.<br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="login" id="_login">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_login">#</a>
		<code><a href="source-class-Authenticate.html#80" title="Go to source code">login</a>( <span>string <var>$name</var></span>, <span>string <var>$roles</var></span> )</code>

		<div class="description short">
			
<p>login assumes that the user has verified the credentials and logs in the
user.</p>

		</div>

		<div class="description detailed hidden">
			
<p>login assumes that the user has verified the credentials and logs in the
user.</p>

<p>The login method hides the session implementation for storing the user
credentials</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$name</var></dt>
					<dd><code>string</code><br> The user name</dd>
					<dt><var>$roles</var></dt>
					<dd><code>string</code><br> The comma delimited list of roles for the user</dd>
				</dl></div>





		</div>
		</div></td>
	</tr>
	<tr data-order="logout" id="_logout">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_logout">#</a>
		<code><a href="source-class-Authenticate.html#97" title="Go to source code">logout</a>( )</code>

		<div class="description short">
			
<p>logout kills the user session and terminates the login properties</p>

		</div>

		<div class="description detailed hidden">
			
<p>logout kills the user session and terminates the login properties</p>








		</div>
		</div></td>
	</tr>
	</table>










</div>

	<div id="footer">
		nort API documentation generated by <a href="http://apigen.org">ApiGen 2.7.0</a>
	</div>
</div>
</div>
</body>
</html>
